put round((y*sin(angle)+x*cos(angle))) into xprime
put round((y*cos(angle)-x*sin(angle))) into yprime
end translate
on movePuck
global x,y,puckIncX,puckIncY
put x+puckIncX into x
put y+PuckIncY into y
end movePuck
on runExperiment
global x,y,xprime,yprime
global rotIncrement5
global puckIncX,puckIncY
global timeIncrement5,trace5
global centerX,centerY
global cardClear5
put 207 into centerX
put 176 into centerY
get the loc of button "puck"
put (item 1 of it)-centerX into x
put (item 2 of it)-centerY into y
put the loc of button "puck" into oldPoint
put 0 into tableRot
put false into cardClear5
hide menubar
choose line tool
set the lineSize to 2
put "Click the mouse to stop." into field "Blurb"
repeat until the mouse is down
movePuck
translate tableRot
if (xprime*xprime)+(yprime*yprime) > (19600) then exit repeat
put (xprime+centerX) & "," & (yprime+centerY) into newPoint
set loc of button "puck" to newPoint
if trace5 is true then
drag from oldPoint to newPoint
put newPoint into oldPoint
end if
put (tableRot+rotIncrement5) into tableRot
end repeat
put "Click on this field to restore the table" into field "Blurb"
show menubar
choose browse tool
end runExperiment
--------- Notes, etc for creation
on test
global x,y,xprime,yprime,angle
ask "Coordinates?"
put item 1 of it into x
put item 2 of it into y
ask "Angle in degrees?"
put (it * (pi/180)) into angle
translate
put xprime into item 1 of msg
put yprime into item 2 of msg
end test
-- the table's center is at 207,176
-- the table's radius is 140 pixels
-- part 5 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=195 top=303 right=329 bottom=219
-- title width / last selected line: 0
-- icon id / first selected line: 16596 / 16596
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Puck
----- HyperTalk script -----
on mouseUp
runExperiment
end mouseUp
-- part 10 (field)
-- low flags: 81
-- high flags: 2004
-- rect: left=11 top=40 right=326 bottom=403
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 0
-- font id: 3
-- text size: 12
-- style flags: 256
-- line height: 16
-- part name: Help
-- part contents for background part 16
----- text -----
Press this field to begin tracing the path of the puck.
-- part contents for card part 10
----- text -----
This experiment deals with a table rotating at a constant angular velocity around its center. An observer, rotating with the table, pushes a dry ice puck (nearly frictionless) onto the table. In the earth frame, the puck travels in a straight line, but in the table frame, it appears to move in a curve.
This card simulates that experiment based on the parameters you can set by clicking on the "Set Parameters" button in the control panel. When setting parameters, remember to take into account the velocity the puck has as a result of being held at the edge of the rotating tabel before being pushed.
For a complete description of the experiment, click on the "Experiment Video" button in the control panel, then click on the first button in the list of selections which will appear.